//
//  VideoCollectionCell.m
//  GameBoss
//
//  Created by dllo on 15/4/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "VideoCollectionCell.h"
#define WIDTH self.videoPic.frame.size.width
#define HEIGHT self.videoPic.frame.size.height

@implementation VideoCollectionCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.videoPic = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height-50)];
        [self.contentView addSubview:self.videoPic];
        [_videoPic release];
        
        self.videostripe_b_r = [self label:CGRectMake(5, HEIGHT-15, WIDTH, HEIGHT/8)];
        self.videostripe_b_r.font = [UIFont fontWithName:@"AppleGothic" size:12];
        self.videostripe_b_r.textColor = [UIColor whiteColor];
        
        self.videoTitle = [self label:CGRectMake(5, HEIGHT+5, WIDTH, 25)];
        self.videoTitle.font = [UIFont systemFontOfSize:14];
        
        self.videoPv = [self label:CGRectMake(5, HEIGHT+30, WIDTH, 20)];
        self.videoPv.font = [UIFont systemFontOfSize:11];
        self.videoPv.textColor = [UIColor grayColor];
    }
    
    return self;
}
//封装label
-(UILabel *)label:(CGRect)frame{
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    [self.videoPic addSubview:label];
    [label release];
    return label;
}

#pragma mark 选取白黑两种模式
- (void)setNightDayModel {
    [NightManager setViewColorWithView:self.contentView];
    [NightManager setLabelColorWithLabel:self.videoTitle];
    [NightManager setLabelColorWithLabel:self.videoPv];
    
}

- (void)setLightDayModel {
    [NightManager setViewColorWithView:self.contentView];
    [NightManager setLabelColorWithLabel:self.videoTitle];
    [NightManager setLabelColorWithLabel:self.videoPv];
    
}
- (void)dealloc
{
    [_videoPic release];
    [_videostripe_b_r release];
    [_videoTitle release];
    [_videoPv release];
    [super dealloc];
}
@end
